package method.Threads;

public class Test {
    public static void main(String[] args) {
        ThreadRedPacket ta = new ThreadRedPacket();
        Thread a = new Thread(ta);
        Thread b = new Thread(ta);
        Thread c = new Thread(ta);
        Thread d = new Thread(ta);
        Thread e = new Thread(ta);
        Thread f = new Thread(ta);
        Thread g = new Thread(ta);
        a.setName("张飞");b.setName("关羽");c.setName("刘备");d.setName("曹操");e.setName("小乔");f.setName("黄忠");g.setName("大乔");
        a.start();//调用start（）方法，其实就是启动线程（运行线程中的run（）方法）
        b.start();c.start();d.start();e.start();f.start();g.start();
    }
}
